<template>
  <!-- todo 此处巨大坑 -->
  <!-- 官文描述：el-container的子元素中有 el-header 或 el-footer 时为 vertical(垂直排列)，否则为 horizontal(横向排列)-->
  <!-- 所以需要显式修改成vertical-->
  <el-container direction="vertical">
    <el-row>
      <el-col :span="16" class="square-box">
        <el-card>
          参考微博样式而不是知乎
        </el-card>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="16" class="square-box">
        <el-card :body-style="{ padding: '0px' }">
          <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
          <div style="padding: 14px;">
            <span>好吃的汉堡</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <el-button type="text" class="button">操作按钮</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </el-container>
</template>

<script>
  export default {
    name: 'squareList',
    data() {
      return {
        tableData: []
      }
    }
    ,
  }
</script>
<!--添加scoped仅影响局部，不影响全局-->
<style scoped>
  @import url("//unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css");

  .el-container > .el-table {
    margin-top: 60px;
  }

  .square-box {
    height: 80%;
    /*overflow-y: auto;*/
    display: flex;
    flex-direction: column;
    /*起作用的是这个，没有的话会变成下图的样子，卡片跑到右边去了*/
  }

  .el-card {
    margin-bottom: 20px;
    /*下边距*/
  }
</style>
